package com.tasogo.comm;

public final class d
{
  private static int a = 45217;
  private static int b = 63486;
  private static char[] c = { 21834, -32083, 25830, 25645, -30978, 21457, 22134, 21704, 21704, 20987, 21888, 22403, 22920, 25343, 21734, 21866, 26399, 28982, 25746, 22604, 22604, 22604, 25366, 26132, 21387, 21277 };
  private static int[] d = new int[27];
  private static char[] e = { 97, 98, 99, 100, 101, 102, 103, 104, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 116, 116, 119, 120, 121, 122 };

  static
  {
    int i = 0;
    while (true)
    {
      if (i >= 26)
      {
        d[26] = b;
        return;
      }
      d[i] = b(c[i]);
      i += 1;
    }
  }

  private static char a(char paramChar)
  {
    int j;
    if ((paramChar >= 'a') && (paramChar <= 'z'));
    do
    {
      do
        return paramChar;
      while ((paramChar >= 'A') && (paramChar <= 'Z'));
      j = b(paramChar);
    }
    while ((j < a) || (j > b));
    int i = 0;
    while (true)
    {
      if (i >= 26);
      do
      {
        if (j == b)
          i = 25;
        return e[i];
      }
      while ((j >= d[i]) && (j < d[(i + 1)]));
      i += 1;
    }
  }

  public static String a(String paramString)
  {
    String str = paramString.toLowerCase();
    int j = str.length();
    paramString = "";
    int i = 0;
    while (true)
    {
      if (i >= j)
        return paramString;
      try
      {
        paramString = paramString + a(str.charAt(i));
        i += 1;
      }
      catch (Exception paramString)
      {
      }
    }
    return "";
  }

  private static int b(char paramChar)
  {
    Object localObject = new String() + paramChar;
    try
    {
      localObject = ((String)localObject).getBytes("GB2312");
      if (localObject.length < 2)
        return 0;
      int i = localObject[0];
      int j = localObject[1];
      return ((j & 0xFF) + (i << 8 & 0xFF00));
    }
    catch (Exception localException)
    {
    }
    return 0;
  }
}